<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>天天生鲜-后台登陆</title>
<link rel="stylesheet" href="css/login.css">
<link rel="short icon" href="images/logo.png" type="image/x-icon">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript">
	function checkLogin() {
		var account = $.trim($("#account").val());
		var pwd = $.trim($("#pwd").val());
		
		//实际项目开发要用正则表达式
		if(account == "" || pwd == ""){
			return;
		}
		
		$.post("../admin/login",{aname: account,pwd: pwd},rt=>{
			if(rt.code == 200){
				location.href="manager/index.html";	
				return;
			}
			alert("账号和密码错误，请确认后重新登陆....");
		},"json");
	}
</script>
</head>
<body>
	<div id="login_top">
		<div id="welcome">
			欢迎使用天天生鲜后台管理系统
		</div>
		<div id="back">
			<a href="../index.html">返回首页</a>&nbsp;&nbsp; | &nbsp;&nbsp;
			<a href="#">帮助</a>
		</div>
	</div>
	<div id="login_center">
		<div id="login_area">
			<div id="login_form">
				<form action="" method="post" id="myform">
					<div id="login_tip">
						用户登录&nbsp;&nbsp;UserLogin
					</div>
					<div><input type="text" class="username" id="account" placeholder="请输入账号..."></div>
					<div><input type="password" class="pwd" id="pwd" placeholder="请输入密码..."></div>
					<div id="btn_area">
						<input type="button"  onclick="checkLogin()" id="sub_btn" value="登&nbsp;&nbsp;录">&nbsp;&nbsp;
					</div>
				</form>
			</div>
		</div>
	</div>
	<div id="login_bottom">
		<label style="color:#FFF"><a class="copy" href="http://www.hyycinfo.com">衡阳市源辰信息科技有限公司 </a>&copy; 版权所有</label>
	</div>
</body>
</html>